<?php

$loader = new \Phalcon\Loader();
//注册命名空间
$loader->registerNamespaces(
    array(
       'B2c\Controllers' => APP_PATH."/app/b2c/controller/",
       'B2c\Models'      => APP_PATH."/app/b2c/models/",
       'Wap\Controllers'  => APP_PATH."/app/wap/controller/",
       "Wap\Models"       => APP_PATH."/app/wap/models/"
    )
)->register();
/**
 * We're a registering a set of directories taken from the configuration file
 */
$loader->registerDirs(
//    array(
//        $config->application->controllersDir,
//        $config->application->modelsDir
//    ),
    array(
        $_CONFIG->b2c->controllersDir,
        $_CONFIG->b2c->modelsDir
    ),
    array(
        $_CONFIG->wap->controllersDir,
        $_CONFIG->wap->modelsDir
    )
)->register();

